%Copyright: C.G. van der Laan, cgl@rc.service.rug.nl, 31 5941 1525 %Version Aug, 1994 \input blue.fmt %\tolerance500\hbadness=499\hfuzz=4pt \everyverbatim{\emc} \postverbatim{\smallbreak\noindent} \let\titlefont\bf \title{BLUe's Format} \subtitle{---The best of both worlds\footnote*{% blue.fmt is released at Euro\TeX'94. How it will develop depends much on how it will be received. It is not perfect nor complete for a general audience, but serves my purposes. BLUe stands for Mr BLUe---my innocent user and relative of Ben Lee User of the \TeX book fame.}} \issue{CTAN, NTG's fileserver, ***PRERELEASE***} \keywords{ Active documents, design, documentation, education, error handling, floats, format, inner versus outer world, inserts, lifephases formats, macro writing, markup language, plain \TeX, scripts, software engineering, (reusable) software parts, style, transparencies. }%\endkeywords \abstract{An independent format---blue.fmt---is provided to assist authors with creating, formatting, exchanging and maintaining compuscripts during the lifephases of publications. The format builds upon manmac.tex and the functionalities provided by tugboat.sty. Experience gained by publishers has been picked up too, because of my in-depth study of the activities of AMS with respect to \TeX{} formatting. More recent work of Knuth and co-authors has been borrowed from gkpmac.tex. The design goal was to provide a format which suits me, which is easy to customize---to the world outside, and in general to changing circumstances---and which adheres to the adages of software engi\-neer\-ing. Another aim of blue.fmt is that it can be used throughout the life-cycle of publications on modest equipment, with a wink to active documents, and that it will serve a lifetime. En-passant the design process is accounted for. New is the handling of a database of references with cross-referencing, all in one-pass job. Even newer is the proposal for a database of pictures, from which specified pictures can be loaded selectively. }%end abstract \thisreferences{The \TeX book and Lamport's \LaTeX{} user's guide are omni-\-pre\-sent and not explicitly listed. \hfuzz=7pt}%\lsstraight \references{\beebenhfd \berryka \cheswickb \doobma \jonesdm \grahamrla \greenwadegd \hamiltonh \heckelp \hendricksonaa\hendricksonax \laancgc\laancge\laancgg\laancgga\laancgh\laancgi\laancgj\laancgk \laancgl\laancgm\laancgp\laancgq\laancgr\laancgs\laancgt \laancgu\laancgw\laancgx\laancgy\laancgz \salomondd\salomondg \spivakmdb \taylorpc \tugpub \whitneyrf }%end references \pictures{\bluemodelpic\furutapic\ntgpiepic\regulartransparencypic \vectorbundlepic} \script{%\beginscript for test purpose the minimal form \head{Introduction} After having studied manmac.tex---Knuth's macros for formatting his Computers and Typesetting series---as well as the TUGboat styles---the (plain) format for TUGboat, the bulletin of the \TeX{} Users Group---I decided to combine the best of both worlds. The goodies given by Knuth to the world are merged with the achievements offered by the members of the various \TeX{} users groups. In order to do this gracefully, I first had to simplify tugboat.sty.\ftn{See my TUGboat BLUes for the proposal tug.ppt, which will be called ppt.tex from now on.} This superset is extended by macros which have emerged from later work of Knuth, and by some macros of my own, dictated by the functionalities I need. Experience gained by publishers has influenced this work too because of my in-depth study of the activities of AMS with \AllTeX{} as formatting tool.\ftn{Because AMS has played a leading role in the \TeX{} world and because TUGboat's chief editor is employed by AMS, it is not surprising that much of AMS' experience has already been incorporated in tugboat.sty. For an account of the activities of AMS with \TeX{} as formatting tool see `AMS BLUes' and the references given in there.} I decided to separate outer level markup from inner level markup. The idea behind this separation is to identify inner level macros which are context independent---or nearly so---and which can be used as a toolbox along with ||\TeX.\ftn{Up till today this borderline between inner and outer level is ill-defined. Definitely (overlapping) clusters can be identified.} By splitting off as much as possible to the inner level the outer level will shrink, with the pleasant side-effect that the amount of work to maintain the format will diminish. To adapt a script for other environments---and changing circumstances in general---will be simpler too. How to cope with the outside world of computer-assisted typography in relation with your inside world, lies at the heart of this article. \beginquote The world outside to learn from, to assimilate what is there, and to give back what you have lived through, to close the circle. \endquote \subsubhead{Warning.} In this composition I made use of earlier work of myself and adapted among others the more systematic use of token variables instead of defs for |\pre| and |\post| and the like next to the systematic building of one-part macros on top of two-part macros. Be aware of these anachronisms in the older articles. \subhead{Why?} In a sense this paper is a summing up of my research of what others have accomplished before in the area of computer-assisted typography via \TeX. I strove after introducing as little overhead as possible---the paper and the macros should not be unduly long. I respect my readers and don't like them to waste their precious time, so I worked hard to make reading worthwhile. \beginquote There is always something to learn from macros written with care. \endquote The design goal of blue.fmt was to create a format which obeys the software engineering adages consistency simplicity, intelligibility, portability, flexibility, extensibility, stability, and openness, next to adaptability, pleasant documentation and correctness of course :-). Furthermore, I don't like superseding packages, which neglect other activities. For example when other activities can't be incorporated easily, or even worse when they are forbidden. I favour a toolbox-like approach, which builds upon plain and allows access to lower layers, let us say I feel myself happy with open systems. The file is considered a format because that loads fast.\ftn{Because of my default value for \cs{footline} a page will be set when creating the format. I kludged the page counter into -1 at the end of the format to counteract the increase.} \smallskip The short answer to the `Why?' comes down to \beginquote I need a format\ftn{Read: order all the stuff.} which assists computer-assisted handling of information, be it consumption or production and dessimination, and which serves a lifetime. \endquote Another answer to the Why? is that when presenting Manmac's BLUes at GUST 94 I was asked to provide a user's guide for manmac. BLUe's Format is my answer to that request, although this article is not a user's guide, per se. The audience in mind consists of those authors who \bitem practise (self-)publishing \bitem choose for English and ASCII \bitem adhere to \TeX{} formatting \bitem like a lifetime tool, sta\-bility, consis\-ten\-cy, simpli\-ci\-ty, porta\-bi\-li\-ty, gene\-ra\-li\-ty, flexi\-bi\-li\-ty \bitem favour an open, well-documented system \bitem prefer an extensible (formatting) language \bitem and support the PD software adage. \noindent Pondering about the audience a little longer makes me feel that most of them belong to the {\it unorganized\/} \TeX{} users, who happily use the tool without much ado. However, the style-designer and hacker can find something new in here too, especially the handling of bibliographies in a one-pass job, respectively how to code a minimal markup macro on top of a two-part macro with the same functionalities. Whatever the value of blue.fmt it definitely servers an educational purpose, with a wink to active documents.\ftn{I like teaching a Manmac BLUes tutorial where the What? and How-to? are dealt with, prolongated into a workshop with goodies from blue.fmt and those contributed by the participants. A really advanced class about macro writing.} It also shows how to build a collection of macros from various sources, or to say it straight to keep things in order. \subhead{Notations and definitions.} AMS denotes the \AMS. manmac.tex stands for the macros used by Knuth for formatting his Computers and Typsetting series of books. ppt.tex stands for my macros inspired by tugboat.sty, to obtain a similar layout. gkpmac.tex stand for the macros used by Knuth and his co-authors to format `Concrete Mathematics.' The picture subset taken from this collection is called gkppic.tex. TUG stands for the international \TeX{} Users Group. TUGboat is TUG's bulletin. TTN stands for TUG's newsletter: \TeX{} and TUG News. NTG stands for the Dutch Language-oriented users group. MAPS is NTG's bulletin. AN is the abbreviation for automatic numbering. The name BLUe has its history, the filename is in lowercase. Control sequence names consist of letters only and therefore when a hyphen occurs in this text as part of a name, it is because of the hyphenation. I like to denote the marked up file as a script---a compuscript, if you like---independent from whether the result is a publication, a set of transparencies, or you name it. A document is a publication on paper, be it in the form of a report, an article or a book. A multi-media publication is a script which can be processed into forms to be viewed via several media. Names of the control sequences consist of a root part with prefixes and postfixes. \cs{ag} and \cs{ea} are shortcuts for \cs{aftergroup} respectively \cs{expandafter}. \head{Specifications} In designing a format there is not such a thing as {\it one\/} specification. We have to deal with the specifications for \bitem look-and-feel in print---typographical design \bitem markup language---syntax and semantics \bitem coding style---data types, control sequences. \noindent Pondering about this and being aware of the difficulties the software engineering history has made explicit, it is not much of a surprise that there is no format that has been designed starting from the specifications.\ftn{Except for manmac, I presume.} Even not tugboat.sty, which was `designed' on the fly and pushed forward by the need of advanced \TeX ies. This can be understood because format design is a new activity, and software engineering has been proven to be a very difficult area. Moreover, the work has to be done mainly by volunteers. \head{Typographical design} Being a layman on the issue I considered it best to take over what has been in use for a dozen of years. For the look-and-feel of the result of a blue script in two-column I took over the main aspects of the TUGboat layout. \head{Markup language} When pondering about developing a format, one has to realise that essentially a markup language will be created. That means that the designer has to be explicit about the syntax and the semantics, and above all provide a simple user interface. That is really something in the presence of macro expansion, because everything can be changed on the fly. I like the orthogonal approach, for example to treat \beginquote \xyz{Minimal tags}{Options}{Place within context} \endquote independent from each other. This approach has been on my mind throughout blue.fmt, but not applied unduly. \subhead{Conventions control sequences.} I chose for \bitem |\begin|, |\end| pairs, which take global options via |\every| and local options via |\this|\ftn{In analogy with Knuth's \cs{every}$\langle tag\rangle\{\dots\}$.} \bitem |\|, minimal variant \bitem token variables |\this!-| and |\every!-| for user guidance for the inner markup \bitem token variables |\pre!-| and |\post!-| for controlling positioning within context \bitem token variables to convey information, like the title \bitem |\pasteup|-s, which position the formatted script element within context. \noindent In a nutshell this comes down to the following control sequences\ftn{Because blue.fmt is a composite these conventions hold mainly for the outer markup. The inner markup control sequences can originate from other sources with their own conventions about naming.} \beginverbatim \{...} or \begin ... \end !endverbatim%the next indented by \parindent, looks better optionally preceded by \beginverbatim \every{...} and/or \this{...} !endverbatim When the place within context should differ from the default supply\ftn{This does not hold for the title part elements. Too much nitty-gritty. Not only the positioning within context is relevant but also the ordering.} \beginverbatim \pre{...} and/or \post{...} !endverbatim I did not bother about the size of the tags, because with nowadays \AllTeX{} intelligent editors these tags don't have to be typed in anymore. Moreover, for \TeX{} each tag represents one token independent of its length. \subsubhead{The bad news} is that minimal markup for \cs{head} and the like can be felt as an anachronism. With \AllTeX{} intelligent editors we don't need minimal markup anymore. The reason to process headtitles and the like on the fly is that catcodes are assigned in phase while processing, meaning for example we can use verbatims as part of the title. It is not possible to associate, via my \TeX nique explained later with \cs{head}, a one-part macro to every two-part macro, in full generality. \subsubhead{The good news} is that via this mechanism we can abstract to a high degree at the {\em user level\/} from token variables and definitions. That is the user can supply the information as if it was a token variable. \subsubhead{Options.} For scripts a useful application is to specify whether the last script is at hand or not. Another use is to specify \cs{onecol}. With verbatims it is handy to supply catcode changes and to specify a file for verbatim file input. The attributes for tables can be specified via this mechanism, for example \cs{ruled}, \cs{framed} and the like. Pictures can take different values from the default for their size. \subsubhead{Place within context.} This is a very general issue. In fact formatting can be seen as placing elements within context. So why bother? To parameterize the place within context is a good approach because it provides for a user, or style designer, the hooks needed for the look-and-feel of the result. A good example of this is \cs{head} and the like. A user can determine the whitespace via \beginverbatim \prehead{...} and \posthead{...} !endverbatim Ditto for verbatims. For tables the \cs{postbtable} token variable is already used for measurements of the table. Usually I place the vbox, which results from my btable macro, in a math display, conform the examples in the \TeX book. For systematic placement of tables either mechanism can be used. I'm still pondering about to format tables at the beginning and past up these boxes at the right place. The difference with references is that we have usually many tables, and box registers are limited available. The next best idea is to have tables also stored in a database and load from there selectively, similar to what I already do with figures. For the moment there is nothing special about figures to be included in the database for selection, as long as it is a definition. So add your tables as well, and use them similarly. For figures I did not provide a \cs{prefigure} or \cs{postfigure} of yet. The pictures are delivered in a hbox. \subsubhead{Changing the defaults} in token variables can be done in two ways \bitem assign new values to the token variables \bitem extend the token variable with your extras. The latter can be done as follows for the cases of appending to |\post| and preceding to |\pre|.\ftn{The latter is inspired by Salomon's courseware.} \beginverbatim \post\ea{\the\post } \def\preadd{} \pre\ea{\ea\preadd\the\pre} !endverbatim \subsubhead{Processing more than one} script per job must be possible. For example for a journal when several articles, each as a selfcontained script, have to be formatted in total, with similar headers and footers. \subhead{What to start with?} The script should start with what I call {\em information\/} elements, preliminary matter such as title, keywords and the like, next to supplying references and pictures. All in arbitrary order and done before \cs{beginscript}. Token variables have defaults. For example your blue.fmt has the token variables \cs{author}, \cs{address}, and \cs{net\-address} already filled-in with defaults. If you wish to assign values to these token variables at the start of your compuscript, feel free to do so. That is the way of substituting actual values for the defaults. Handy isn't it? The contents proper should start with \cs{begin\-script}, to handle the paste-up of the title matter, and end with \cs{end\-script}, to finish the script. This can be preceded by \cs{every\-script} or \cs{this\-script}. When a script is formatted on its own the use of \cs{this\-script}, and especially \cs{every\-script} can be omitted. For processing more than one script provide \cs{not\-last\-script} in \cs{every\-script}, and provide the last script with \cs{last\-script} in \cs{this\-script}. However, most of the above does {\em not\/} hinder that \thisverbatim{\catcode`!=12 \catcode`+=0 } \beginverbatim Thank you!\bye +endverbatim can be run with blue.fmt, although it is not a blue script according to my definitions. It is very handy for testing parts of a blue script. \beginquote blue.fmt does not impose! \endquote \subhead{Active documents.} The revolution of computer-assisted typo\-graphy has introduced the concept of active documents. For me this activity is all about \beginquote the discrepancy of the ordering of elements as marked up in the compuscript, and the positioning and representation of the document elements in the resulting document. \endquote The hierarchy in which the document elements have been supplied does no longer imply a similar sequence in print. The ordering can be altered due to writing to and reading from the computer's memory, be it RAM (random access memory) or be it external memory with sequential access.\ftn{Knuth was aware of this avant l\`a lettre via his insert mechanism and his coding of answers.} Actually this happens with the title and the like. The keywords, abstract and contents are set in boxes and pasted up in the replacement text of \cs{beginscript}. Similarly the references have to be specified in the preliminary part. \beginquote The place to paste up the references can be chosen by the author via \cs{pasteupreferences}. \endquote Similar for pictures. These are also selectively loaded in the preliminary part and \beginquote the place to paste up a picture can be chosen by the author via the use of |\pic|. \endquote In order not to lose ground, I will start from an informal template and formalise from there. The result aims at being {\em supportive\/} for authors, a structure to which marked up documents should comply to. %The meaning of the tags must be as provided in blue.fmt. \subhead{Template.} When I start writing down my findings, I involuntarily use an article-like structure, which at the outer level bears the markup as can be seen from the accompanying table.\ftn{After having studied various works it is hard to get rid of anachronisms. Being aware of that I hope it did work out. For the code of the structures given in the template start with the ppt part of the blue.fmt file.} In contrast with summing up all what is provided in manmac.tex, gkp.mac and ppt.tex,\ftn{See for that my Manmac BLUes, BLUe's Graphs, respectively TUGboat BLUes.} I will start informally with the desired functionalities---at two levels---% and indicate which macros will accomplish these. The template---as a sketch of what I have in mind---should guide me towards what is needed syntactically and semantically. \subhead{Outer markup.} Generally I use a template, an empty article as fill-in form, with the main markup structures already there and in the right order. A rudimentary discussion follows below, because once used to the template, the outer markup is a trifle. \topinsert \thisverbatim{\catcode`\~=14 } \beginverbatim %Template script---outer level markup %Info part: elements in arbitrary order \issue{MAPS 94.2} \title{BLUe's Cross-Referencing} \subtitle{---A one-pass approach} \keywords{...} \abstract{...} \contents{Introduction \quad Why? ... Acknowledgements, Conclusion, References} \references{~ \!math!langle!,name_1!rangle!dots!endmath~ \!math!langle!,name_n!rangle!endmath} \pictures{~ \!math!langle!,name_1!rangle!,pic!dots!endmath~ \!math!langle!,name_n!rangle!,pic!endmath} \beginscript %Copy proper \head{Introduction} %various parts with inner markup %Back matter (with simple index to come) \pasteupreferences \endscript !endverbatim \endinsert \subsubhead{Information part} consists of title,\ftn{I favour a short title, optionally extended by a subtitle. Because of this I can use the title in the running head too, and there is no need for a separate specification of a running title.} author (address information), keywords, abstract, contents, references, and pictures independent from whether these issues appear at the beginning in print or not.\ftn{In regular issues of TUGboat the address information is printed at the end, while in the proceedings issues the address information is printed as part of the front matter.} The idea is to supply this information early in the script---and in fact author and address information are suited for defaults---such that it can be used anywhere.\ftn{This is reminiscent of providing it at the beginning and typesetting it immediately. Nowadays the providing of the information is no longer tied up with formatting it immediately.} By supplying the references also at the beginning we don't need a multi-pass job for cross-referencing.\ftn{The references are set and the names get their numbers as replacement text. Later in the script the markup command \cs{pasteupreferences} pastes up the earlier set references.} Bibliographical information\Dash classification, ISBN and the like\Dash is added separately and generally by other tools. It is relevant when the work enters the outside world. So the publisher will take care of these issues, I guess. The \cs{beginscript} control sequence marks the beginning of the compuscript proper.\ftn{Via this idea of scripts an editor can happily run \cs{onecol} and \cs{twocol} submissions in one job.} Whether it concerns an article, report, book or a set of transparencies, \cs{beginscript} is a generic control sequence which has been defined appropriately within the context. It starts formatting the title part and processing the script elements which follow. The compuscript is ended by \cs{endscript}.\ftn{And if you are a masochist you can use the minimal from.} The keywords and abstract parts traditionally serve the quick reader and facilitate the selection process, whether the article is about what you are looking for. Note that the contents is context dependent and presumes the table of `contents' to be supplied in a {\em near natural\/} way: line-by line. For indentation\ftn{Not for transparencies.} simply supply \cs{quad} or \cs{qquad}.\ftn{No automatisms have been provided for automatically collecting the table of contents information while formatting. No multi-pass job!} \subsubhead{Chapters and the like} are marked up with rootname |head|, with the title as argument.\ftn{Similarly for |subhead|, and |subsubhead|.} I hardly use automatic numbering, and when needed it can be added easily. Note that I like running-in heads---like in this paragraph---and therefore no enddot is inserted automatically.\ftn{Of course I could have parameterized this in \cs{end\-punc\-tu\-ation}. For the moment I refrained from doing so. Knowing when to stop is important.} \subsubhead{Running headers and footers} make use of the token variables \cs{headline} and \cs{footline}, with the information automatically distilled from the title token variables, like \cs{title}, \cs{author}, and \cs{issue}. \subsubhead{Bibliography} handling is a much overstressed aspect IMHO. I like to keep it simple. Firts of all I like that the database of formatted entries is already with the publisher, and that we only have to refer to the entries. But that seems wishful thinking still, although my approach comes close. I use the macros and database which emerged from `BLUe's Bibliography,' because it facilitates the selection from the database---the file lit.dat---and performs the formatting all in one-pass job. The typograhical design has been inspired by ams.ppt style. It is customizable. Since `BLUe's Bibliography' has been dis\-tri\-bu\-ted in MAPS, I extended the macros with a simpler user interface. \beginquote After \cs{be\-gin\-re\-fer\-en\-ces} just supply the names for the references and close by \cs{end\-re\-fer\-en\-ces}.\ftn{Or use the minimal markup variant.} And paste up via \cs{pasteupreferences}. \endquote Text to precede the list of references can be supplied via \cs{this\-ref\-er\-en\-ces}, as has been done in this article. The above can best be provided in the preliminary part, definitely before a reference to a literature item by number will be made. The paste-up is a different matter, and the place is at the discretion of the author. Cross-referencing can be done via the name-and-year convention\ftn{Fundamental for me are author names and the year of publication, next to the titles and sources. In the field I'm working I know by heart which work is hinted at when the author and year is mentioned.} or via the \TeX nique as explained in `BLUe's Bibliography,' that is each name will be redefined by its sequence number as replacement text at the place where the references are supplied. Furthermore, I'm so much surprised by the ample use of punctuation in items of a literature database. I favour minimal punctuation. Abstracting from this punctuation was another option, but I decided not to try for a too general approach with its overhead. \beginquote Minimalism as a royal road to simplicity! \endquote I agree that my references macros do a lot of work. It looks a bit overdone when only a few references have to be formatted. Firstly, so what? The references have already been used before, so they don't need proofreading so much,\ftn{Nor the fine-tuning with respect to underfull box messages, not to speak about avoiding overfull ones. See Phil Taylor's paper on the issue.} and therefore can be suppressed while working on the paper. Secondly, if you don't like BLUe's automatisms why not format a list of the few references yourself? Just a heading and some \cs{items}, that is all. See the \TeX book p.340--341, for the example article of Knuth.\ftn{If you prefer to mark up all the subelements of an bibliography feel free to do so. For formatting via blue.fmt \cs{ls} must be customized then. Available are \cs{lsams}, default, and \cs{lsstraight}.} \subsubhead{Pictures.} The use is to supply the following in the preliminary part \thisverbatim{\catcode`~=14 } \beginverbatim \pictures{~ \!math!langle!,name_1!rangle!,pic!dots!endmath~ \!math!langle!,name_n!rangle!,pic!endmath} !endverbatim \noindent and to invoke the picture at the appropriate place in the script via \beginverbatim \!math!langle!,name!rangle!,pic!endmath !endverbatim \noindent optionally preceded with |\thispicture{...}| . \subsubhead{Index} preparation comes usually later. It can be done via manmac's writing of index reminders (IRs) to a file, and formatting the sorted, compressed and in general enriched IRs via manmac's doublecolumns environment. The IRs written to the file index.tex obey the syntax \beginverbatim !]!!!] !endverbatim Knuth sorts and enriches the IRs outside of \TeX. The resulting marked up file contains elements like \thisverbatim{\catcode`\|=12 } \beginverbatim *|\accent| (general accent), 9, 54, 86, 283, +286. accents (\'{} \`{} \"{} etc\period), 7, @52--53, @339, +356, 357, 427--429. \sub as ligatures, 46, 54. \sub in math, @135--137, 141, 164--165, +359, 435, +443. \sub on top of accents, 136. \sub table, 52, 135, 339. !endverbatim\noindent Note that he has added the markup \begindisplay\displayindent\parindent * &primitives of \TeX\cr @ &set in italics\ftn{An instructive example.}\cr + &underline\ftn{ Definition or main source of information.}\cr \cs{sub} &a subentry \enddisplay next to `see also' text and other helpful goodies. In my `Sorting in BLUe' the sorting within \TeX{} of IRs is touched upon. I agree with Knuth that an index enriched in his way can better be handled by several jobs, to obey the separation of concerns principle.\ftn{\TeX{} to provide for the index.tex file $\rightarrow$ a bunch of (Perl) scripts to sort and markup the information $\rightarrow$ \TeX{} again to format the index.} \goodbreak However, \beginquote it would be nice to be able to process a simple index completely and automatically within \TeX.\ftn{See `BLUe's Index.'} \endquote Makeindex comes with \LaTeX, and Salomon has provided a plain version of it, to work together with some Modula2 programs. These programs did not adopt Knuth's markup for the IRs. I guess this is because they also provided for tags to mark up subentries, see also and the like. The macros provided in manmac for writing IRs to a file and for formatting the enriched information in two columns are superb. \subhead{Inner markup.} In contrast with the outer markup I will include in this part examples borrowed from the special papers on the issue.\ftn{For more details peruse my BLUe's series as made available in NTG's MAPS, or await the upcoming book 'Publishing with \TeX.' The latter also accounts for adjustments of details, the mods, the increased consistency, the ease of use and the like. Once I overheard George Greenwade---the originator of CTAN---% saying that he was so much surprised by the number of changes for submissions to the CTANs. And indeed I must confess I changed quite some details too.} At the end I will come back to manmac's one-column specifics. I won't treat the abbreviations and logos taken from tugboat.cmn. These are self-explanatory. \subsubhead{(Special) Paragraphs} are for example provided by \cs{item}, and derivatives. \example{Bulleted items} I love Knuth's \cs{item}. It is so general and can easily be adapted to automatically format bulleted items---and others as well---via the use of\ftn{\TB, exercise 14.10.} \beginverbatim \def\bitem{\item{$\bullet$}} !endverbatim \example{AN items} Confer \TB, p102 \beginquote `It is customary to put \cs{medskip} before and after a group of itemized paragraphs, and to say \cs{noindent} before any closing remarks that apply to all of the cases.'\ftn{I did not chose for \cs{medskip} nor did I impose the \cs{noindent}. I did not insert special markup preceding the list of items.} \endquote The markup reads \beginverbatim \nitem first\\second line \itemitem{} subitems\\next line \nitem second\\second line \smallbreak !endverbatim \noindent with result \smallskip \nitem first\\second line \itemitem{} subitems\\next line \nitem second\\second line \smallbreak Other special paragraphs are formed by footnotes endnotes and notes in the margin. For footnotes with automatic numbering I use \cs{ftn}, based upon \TB{} exercise 15.12. This exercise is an extension of \cs{footnote} which processes the footnote on the fly, and therefore allows verbatims. \example{Footnote with AN\ftn{From TUGboat BLUes.}} \beginverbatim ...text.\ftn{Note to text.} !endverbatim \subsubhead{Quotations} as used in the \TeX book are right justified. The markup for the end of page 1 of the \TeX book reads as follows. \example{\TB~p.~1} \beginverbatim %chapter contents precedes \endchapter%Followed by the quotations They do certainly give very strange and new-fangled names to diseases. \author ^{PLATO}, {\sl The Republic}, Book 3 (c.\ 375 B.C.) % 405c \bigskip Technique!!... %and finally \eject !endverbatim This markup definitely reflects structure, I also use \cs{beginquote}, \cs{endquote}, in order to quote from literature within the text. \subsubhead{Exercise and answer} markup macros have been used for formatting the \TeX book, and are provided in manmac.tex. For the answer the writing to a file verbatim has been used, in order to typeset the answer at a place different from the occurrence in the compuscript. When proofing the answer can be set right after the exercise. Active documents, aha! The markup reads as follows. \example{\TB~p.~4} \beginverbatim \exercise What do you think happens when you type four hyphens in a row? \answer You get em-dash and hyphen (----), which looks awful. \par%or blank line !endverbatim \subsubhead{Math} from plain can be enriched by automatic numbering and cross-referencing, as well as with special symbols. The cross-referencing has been worked out in `BLUe's Cross-Referencing.'\ftn{For special symbols use AMS' fonts.} \example{From BLUe's Cross-Referencing} Look at the places where normally the explicit equation number should be supplied. \cs{ref} optionally followed by |\| is all what has to be inserted. For referencing provide \cs{crsref} |\|. That is all, a compatible extension. I love it.\ftn{It is true that forward references need the insertion of the number in the script manually before the ultimate processing.} \beginverbatim \item{--} Labeled 1-line $$\sin2x=2\sin x\, \cos x \eqno\ref\cgla$$ \item{--} Three lines, second flushed right (relevant for 2-column printing) $$\displaylines{F(z)= a_0+{a_1\over z}+{a_2\over z^2}+\cdots +{a_{n-1}\over z^{n-1}}+R_n(z),\cr \hfill n=1,2,\dots\,,\cr \hfill F(z)\sim\sum_{n=0}^\infty a_nz^{-n}, \quad z\to\infty\hfill\ref\cglb\cr}$$ \item{--} Two lines aligned, with middle labeling $$\eqalign{\cos2x&=2\cos^2x-1\cr &=\cos^2x-\sin^2x\cr} \eqno\ref$$ \item{--} Two lignes aligned, with labeling per line $$\eqalignno{ \cosh2x&=2\cosh^2x-1& \ref\cgld\cr &=\cosh^2x+\sinh^2x\cr}$$ and citations \cite\cgla, \cite\cglb, \cite\cgld !endverbatim \noindent with result \medskip \item{--} Labeled 1-line $$\sin2x=2\sin x\, \cos x \eqno\ref\cgla$$ \item{--} Three lines, second flushed right (relevant for 2-column printing) $$\displaylines{F(z)= a_0+{a_1\over z}+{a_2\over z^2}+\cdots +{a_{n-1}\over z^{n-1}}+R_n(z),\cr \hfill n=1,2,\dots\,,\cr \hfill F(z)\sim\sum_{n=0}^\infty a_nz^{-n}, \quad z\to\infty\hfill\ref\cglb\cr}$$ \item{--} Two lines aligned, with middle labeling $$\eqalign{\cos2x&=2\cos^2x-1\cr &=\cos^2x-\sin^2x\cr} \eqno\ref$$ \item{--} Two lignes aligned, with labeling per line $$\eqalignno{ \cosh2x&=2\cosh^2x-1& \ref\cgld\cr &=\cosh^2x+\sinh^2x\cr}$$ \noindent and citations \cite\cgla, \cite\cglb, \cite\cgld. When I worked on `Math into BLUes,' I considered it handy to extend \cs{eqalign} with a repetitive template such that more than one alignment point is accounted for. This extension has been incorporated in blue.fmt. At that time I was quite surprised that \LaTeX{} does not allow as such the inclusion of the \cs{eqalign} family of macros, because \cs{centering} is used in \LaTeX{} for a different purpose, that is, it is not a glue quantity. \subsubhead{Tables} can be marked up by \cs{halign},\ftn{Or its transpose \cs{valign}.} or the alignment display. %The latter is used at the end %of the article. Part of its markup is shown below. The latter is heavily used in manmac at a lower level. \example{Table of markup tags} \begindisplay\displayindent\parindent Tags &Reg script\quad&Tansparencies\cr \noalign{\vskip.5ex\hrule\vskip1ex} \multispan3{Token variables\hfil}\cr \cs{title} &+ &+\cr %et cetera \enddisplay is obtained via \beginverbatim \begindisplay\displayindent\parindent Tags &Ref script\quad&Tansparencies\cr \noalign{\vskip.5ex\hrule\vskip1ex} \multispan3{Token variables\hfil}\cr \cs{title} &+ &+\cr %et cetera \enddisplay !endverbatim \noindent Note the special use of `option's after \cs{begindisplay} till the end of line. The invoke of \cs{halign} and its template are hidden by \cs{begindisplay}. Hardly no overhead, neat! Under the hood use has been made of the powerful, but much neglected, alignment display. Font charts are special. I find Knuth's \cs{beginchart} \cs{endchart} macros unsurpassed. \example{Font charts, \TB{} Appendix~F, 427, 428, 429, 430, 431, 432} \beginverbatim \beginchart\tenrm %\tenit, \tentt, or ... (see above) \normalchart \endchart !endverbatim \noindent Is that all?!? What does the result look like? Yes, definitely, manmac reflects descriptive markup, to say the least. For the result in print open the \TeX book. At a higher level I find the bordered table approach handy, because this allows me to treat the border separately, next to abstract from the row and column separators. At the outer level the logical number of columns and rows can be easily recognized from the markup. \example{From `What is \TeX{} etc.'} \beginverbatim \def\data{11\cs12\rs21\cs22} \item{--} just framed data $$\vcenter{\framed \beginbtable\data\endbtable}$$ \item{--} add header and rowstubs \def\header{\logms2\hfill Header\hfill} \def\rowstblst{{$1^{st}$ row}% {{$2^{nd}$ row}}} $$\vcenter{\beginbtable\data\endbtable}$$ \item{--} add caption and footer, vary via dotted lines \def\btablecaption{Caption} \def\footer{Footer} $$\vcenter{\dotruled \beginbtable\data\endbtable}$$ \item{--} vary with ruled and framed $$\vcenter{\ruled\framed \beginbtable\data\endbtable}$$ !endverbatim \noindent with result \medskip {\def\data{11\cs12\rs21\cs22} \item{--} just framed data $$\vcenter{\framed \beginbtable\data\endbtable}$$ \item{--} add header and rowstubs \def\header{\logms2\hfill Header\hfill} \def\rowstblst{{$1^{st}$ row}% {{$2^{nd}$ row}}} $$\vcenter{\beginbtable\data\endbtable}$$ \item{--} add caption and footer, vary via dotted lines \def\btablecaption{Caption} \def\footer{Footer} $$\vcenter{\dotruled \beginbtable\data\endbtable}$$ \item{--} vary with ruled and framed $$\vcenter{\ruled\framed \beginbtable\data\endbtable}$$ \noindent{\bf Remark.} Tables which are larger than a column (in \cs{twocol}) can be put in an Appendix for the moment, with \cs{onecol} switched on. No \cs{multicol} output routine of yet, which allows $1\leftrightarrow2$ column switching and vice versa anywhere on the page. Tables which extend the page with header automatically repeated on every top of the page are not treated. Consult for those the CTAN.\ftn{I would implement this by modifying the OTR such that the toks variable tableheader will be inserted. If empty nothing will appear.} Verbatim in tables is not special either. The only thing that matters is that the table contents is processed on the fly. That comes down usually to processing via two-part macros, definitely not storing the contents. \subsubhead{Pictures} have to do with place within context\ftn{A general aspect for document elements which don't look nice over a page break, or have to be formatted with something special around them.} and with the picture proper. For graphs one can use plain's turtle graphics, manmac's line-diagrams, or gkpmac.\ftn{The macros for graphics are not robust. Vectors of length 0 go wrong (no arrowheads as such). Placement of arrowheads at the end of \cs{squines} needs trial-and-error adjustments. Inconsistent with \LaTeX{} is the reference point of \cs{makebox}. In `BLUe's Graphs' I have discussed these issues. I also added \cs{framebox}.} \subsubhead{Plain's} boxes approach. \example{Scheme via plain, from AMS BLUes} \beginverbatim \def\element#1{\hbox to15ex{\hss#1\hss}} $$\hbox{\vbox{\lineskip.5\lineskip \element{author(\TeX)} \element{$\downarrow$} \element{\tt amsppt.sty} \element{$\downarrow$} \element{\tt amstex.tex} \element{$\downarrow$} \element{\TeX} }\qquad\qquad\qquad\qquad \vbox{\lineskip.5\lineskip \element{ author(\LaTeX)} \element{$\downarrow$} \element{\tt amsart.sty} \element{$\downarrow$} \element{\llap{{\tt amstex.sty}$\,% \rightarrow\;$}\LaTeX} \element{$\downarrow$} \element{\TeX} !endverbatim with result \def\element#1{\hbox to15ex{\hss#1\hss}} \hbox{\vbox{\lineskip.5\lineskip \element{ author(\TeX)} \element{$\downarrow$} \element{\tt amsppt.sty} \element{$\downarrow$} \element{\tt amstex.tex} \element{$\downarrow$} \element{\TeX} }\qquad\qquad\qquad\qquad\vbox{\lineskip.5\lineskip \element{ author(\LaTeX)} \element{$\downarrow$} \element{\tt amsart.sty} \element{$\downarrow$} \element{\llap{{\tt amstex.sty}$\,% \rightarrow\;$}\LaTeX} \element{$\downarrow$} \element{\TeX} \subsubhead{Manmac's} \cs{makeblankbox} approach. \example{From Manmac BLUes} \beginverbatim $$\hbox{\vbox{% \element{\fbox{amsppt.sty}} \vconnector \element{\fbox{amstex.tex}} \vconnector \element{\fbox{\TeX}} }\qquad\qquad\qquad\vbox{% \element{\fbox{amsart.sty}} \vconnector \element{\llap{\fbox{amstex.sty}---} \fbox{\LaTeX}} \vconnector \element{\fbox{\TeX}} !endverbatim \noindent I obtained {\def\strut{\vrule height2.5ex depth1ex width0pt} \def\fbox#1{\setbox0\hbox{\strut $\;$#1$\,$}\leavevmode\rlap{\copy0}% \makelightbox} \def\element#1{\hbox to15ex{\hss#1\hss}} \def\vconnector{\element{\strut\vrule}} $$\hbox{\vbox{% \element{\fbox{amsppt.sty}} \vconnector \element{\fbox{amstex.tex}} \vconnector \element{\fbox{\TeX}}} \qquad\qquad\qquad \vbox{% \element{\fbox{amsart.sty}} \vconnector \element{\llap{\fbox{amstex.sty}---}% \fbox{\LaTeX}} \vconnector \element{\fbox{\TeX}}} with the auxiliaries\ftn{\cs{makeblankbox} is used in \TB{} in exercise 11.5, for the skyline of words.} \beginverbatim \def\strut{\vrule height2.5ex depth1ex width0pt} \def\fbox#1{\setbox0\hbox{\strut $\;$#1$\,$}\leavevmode\rlap{\copy0}% \makelightbox}%See appendix \def\element#1{\hbox to15ex{\hss#1\hss}} \def\vconnector{\element{\strut\vrule}} . !endverbatim {\bf gkpmac} the generic solution. gkpmac provides \LaTeX's picture environment in essence. My added value to this collection is that I provided the possibility for options via my \cs{this}\dots\ and \cs{every}\dots. gkp's \cs{beginpicture} remains accessible because I renamed it with prefix gkp into \cs{gkpbeginpicture}. \example{Lines, text and circle/disk} \beginverbatim \thispicture{\unitlength=1cm \xdim{7}\ydim{3} \yoffset{-1.5} \beginpicture \line(1,1){1} \line(1,-1){1} \makebox(2,0){Beer} \disk{.25}\quad \circle{.5} \endpicture !endverbatim with result\ftn{Note the omission of \cs{put}-s in this simple case.} $$\unitlength=1cm \gkpbeginpicture(7, 3)(0,-1.5) \line(1,1){1} \line(1,-1){1} \makebox(2,0){Beer} \disk{.25}\quad \circle{.5} \gkpendpicture$$ \noindent The new \cs{beginpicture} with uncoupled coordinates and offsets allows an interesting possibility to store a picture and when using it to provide it with the actual values of \cs{unitlength} and the offsets. An invocation comes down to \beginverbatim \pic !endverbatim eventually preceded by \cs{this\-pic\-ture} or \cs{every\-pic\-ture}. \beginverbatim \thispicture{\unitlength= \xoffset{}\yoffset{}} !endverbatim \noindent The database should contain the picture \beginverbatim \def\pic {\bgroup%defaults \unitlength= \xdim{}\ydim{} \beginpicture ....%picture descriptions \endpicture \egroup} !endverbatim \noindent with \beginverbatim \def\beginpicture{\bgroup \the\everypicture\the\thispicture \gkpbeginpicture(\the\xdim,\the\ydim)% (\the\xoffset,\the\yoffset)} \def\endpicture{\gkpendpicture\egroup \global\thispicture{}} !endverbatim \noindent A gkpmac compatible extension.\ftn{The name changes with prefix gkp have been incorporated in the gkppic file.} The size and the offset have been decoupled from the picture. Interesting, very interesting. The basis for a database of pictures has been laid. The \TeX nique of selective loading similar to the one used with bibliography entries can be applied too. The same structural approach has been followed. \subsubhead{Selecting and loading.} Imagine you have built up a number of pictures each consisting of a reasonable amount of picture instructions. Then you can either \bitem input the whole file and use only those entries needed, via \cs{loadallpictures}, and not via \cs{input pic.dat} because the common aspects have to be activated, or \bitem load selectively only those needed. \smallbreak I have used selective loading before in `BLUe's Bibliography,' and it can be used easily for this selective loading of pictures from a picturebase. The basic observation is that specified control sequences are redefined. This in contrast with the application of a format or style file where the file is not loaded when some names are already available, to prevent double loading. My use is the opposite. I specify the names I like to be selected. \example{Oval via gkpmac} \beginverbatim $$\originpic$$ %with \def\originpic {\bgroup\unitlength1cm \xdim{3}\ydim{1} \beginpicture \put(1,.5){\oval(2,1)} \put(0,0){\markorigin} \endpicture \egroup} !endverbatim with result \def\originpic {\bgroup\unitlength1cm \xdim{3}\ydim{1} \beginpicture \put(1,.5){\oval(2,1)} \put(0,0){\markorigin} \endpicture \egroup} $$\originpic$$ Note that the placement within context is handled by the math display which seems enough for me to refrain from the use of \cs{prepicture} and \cs{postpicture}. The following examples assume that the pictures are available in the picture database. No need for \cs{thispicture} but it can be used to provide user guidance. \example{Vectorbundle via gkpmac} \beginverbatim \vectorbundle !endverbatim with result \vectorbundlepic \example{Flow chart (Furuta)} \beginverbatim \furutapic !endverbatim with result \noindent \furutapic Remark. From \LaTeX's line fonts it can be seen that the arrowheads are designed to match seemless with line elements to form vectors. When direction indicators are needed along with curves I use PMA---poor man's arrowheads, built from a small \cs{hrule} and \cs{vrule}---as can be seen from the accompanying flow chart. In general I think that arrowheads with the heart of the arrow as reference point would be useful. \example{Pie-chart} A more cumbersome use of \cs{squine} has been realized in the following `circle.' This figure was easily transcribed from my earlier \LaTeX{} variant based on the use of \cs{bezier}. \beginverbatim \ntgpiepic !endverbatim with result \ntgpiepic \subsubhead{Verbatim} macros are needed by authors who write in \AllTeX{} about \AllTeX.\ftn{Erik Frambach communicated that they are also used for programs written in other languages than \AllTeX.} Usually we distinguish in-line versus dislay verbatim facilities. Furthermore we need file verbatim inclusion, and semi-transparent verbatim, meaning that an escape character is available allowing us to do whatever we wish.\ftn{Not to forget to end the verbatim.} In blue.fmt I included the macros which emerged from `BLUe's Verbatim.' \example{From BLUe's Verbatim} Important functionalities are shown below \thisverbatim{\catcode`\|=12 \let\-=- \catcode`\!=12 \catcode`\<=12 \catcode`\-=0 } \beginverbatim %1. To handle via default ! escape char % -- other fonts % -- footnotes % -- emc (enable metacode) \thisverbatim={\emc \def\ftxt{Footnote text typed in on more than one line.}} \beginverbatim Some and blah, blah, ... !it Now text in italics!tt and back again in tt footnote!footnote!bgroup!rm!ftxt!egroup !endverbatim %2. To handle numbering and % verbatim file inclusion \everyverbatim={\numvrb} \thisverbatim={% \catcode`\!=12 % default escape char \catcode`\|=12 % used for inline verb \input vrb.tex \catcode`\*=0 }% to terminate \beginverbatim Extras after file *endverbatim %3. To restart (line)numbers \thisverbatim={\vrblin0 }%Or \numvrb \beginverbatim Just some text with ligatures such as ?` switched off (TB 381). line numbers restarted via \vrblin0 (in general via \numvrb). After two blank lines. !endverbatim %4. Inline verbatim via minimal tags %Minimal | tag for inline verbatim \makeactive\| \def|{\bgroup\setupverbatim \the\everyverbatim \the\thisverbatim \def|{\egroup\thisverbatim{}}} \thisverbatim{\emc} Before || after. -endverbatim \noindent Remarks. The \vrt-definition for the minimal tag has also been included in blue.fmt. Beware, don't use \vrt\ as such for the symbol, but mark up with \cs{vrt} when just the symbol is needed. The escape character in verbatim is very convenient. I used this for subscripting in verbatims, and for selective numbering of the macros in verbatim listings, meaning that code parts can start with a nice number, like 100, 200 and so on. This can be done by including \beginquote \%|vrblin|= 100, respectively\\ \%|vrblin|= 200. \endquote I refrained for the moment to provide Knuth's way of handling of tab characters, that is a variable number of spaces. See for that \TB, p.391. \subsubhead{Special texts} are for example programs. Manmac's syntax macros can be used to format the syntax rules. I love those macros, they guide you towards natural markup. Superb again! \example{\TB~p.~268} \beginverbatim \beginsyntax \is% \alt \endsyntax !endverbatim The markup of the top level part of the syntax chart for a blue script reads \thisverbatim{\catcode`\|=12 \unmc} \beginverbatim \beginsyntax \is|\input|\thinspace% blue.fmt\thinspace \is